package com.lightboat.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lightboat.common.annotation.Excel;
import com.lightboat.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 物流地址配置对象 crm_logistics_address
 * 
 * @author lightboat
 * @date 2025-08-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(title = "物流地址配置")
@TableName(value = "crm_logistics_address", autoResultMap = true)
public class CrmLogisticsAddress extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Schema(title = "主键ID")
    @TableId
    private Long id;

    /** 物流编号 */
    @Schema(title = "物流编号")
    @Excel(name = "物流编号")
    private String logisticsNo;

    /** 物流名称 */
    @Schema(title = "物流名称")
    @Excel(name = "物流名称")
    private String logisticsName;

    /** 姓名 */
    @Schema(title = "姓名")
    @Excel(name = "姓名")
    private String name;

    /** 手机号 */
    @Schema(title = "手机号")
    @Excel(name = "手机号")
    private String phoneNumber;

    /** 公司 */
    @Schema(title = "公司")
    @Excel(name = "公司")
    private String company;

    /** 省 */
    @Schema(title = "省")
    @Excel(name = "省")
    private String province;

    /** 市 */
    @Schema(title = "市")
    @Excel(name = "市")
    private String city;

    /** 区 */
    @Schema(title = "区")
    @Excel(name = "区")
    private String district;

    /** 详细地址 */
    @Schema(title = "详细地址")
    @Excel(name = "详细地址")
    private String detailAddress;

    /** 详细地址 */
    @Schema(title = "详细地址")
    @Excel(name = "详细地址")
    private String fullAddress;

    /** 收发类型（1收 2发） */
    @Schema(title = "收发类型（1收 2发）")
    @Excel(name = "收发类型", readConverterExp = "1=收,2=发")
    private Integer type;

    /**
     * 状态
     */
    @SchemaProperty(name = "状态")
    @Excel(name = "状态", readConverterExp = "0=禁用,1=正常")
    private Boolean status;

    /**
     * 权重
     */
    @Excel(name = "权重")
    @SchemaProperty(name = "权重")
    private Integer weight;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("logisticsNo", getLogisticsNo())
            .append("logisticsName", getLogisticsName())
            .append("name", getName())
            .append("phoneNumber", getPhoneNumber())
            .append("company", getCompany())
            .append("province", getProvince())
            .append("city", getCity())
            .append("district", getDistrict())
            .append("detailAddress", getDetailAddress())
            .append("fullAddress", getFullAddress())
            .append("type", getType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
